#!/bin/sh

pppoe_start() {
  echo "Starting pppoe-server..."
  /usr/sbin/pppoe-server -I vboxnet0
}

pppoe_stop() {
  echo "Stopping pppoe-server..."
  killall pppoe-server
}

pppoe_restart() {
  pppoe_stop
  sleep 1
  pppoe_start
}

case "$1" in
'start')
  pppoe_start
  ;;
'stop')
  pppoe_stop
  ;;
'restart')
  pppoe_restart
  ;;
*)
  pppoe_start
esac
